<?php
$this->pageTitle = Yii::app()->name . ' - Suspicious Email';
?>
<h1>Report Suspicious Email</h1>
<?php if (Yii::app()->user->hasFlash('suspiciusEmail')): ?>
    <div class="flash-success">
        <?php echo Yii::app()->user->getFlash('suspiciusEmail'); ?>
    </div>
<?php else: ?>
    
    <p class="info" style="font-style: italic">
        Scammers will always try to scam our investors. That’s why if you find out any Suspicious Email in your mail box, Don’t Delay; Please let us know by filling up the information. Informants’ identity will be in disguise.
    </p>

    <div class="form">
        <?php
        $form = $this->beginWidget('CActiveForm', array(
            'id' => 'suspiciusEmail-form',
            'enableClientValidation' => true,
            'clientOptions' => array(
                'validateOnSubmit' => true,
            ),
        ));
        ?>
        <?php echo $form->errorSummary($model); ?>
        <div class="row">
            <?php echo $form->labelEx($model, 'informantname'); ?>
            <?php echo $form->textField($model, 'informantname'); ?>
            <?php echo $form->error($model, 'informantname'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model, 'emailcount'); ?>
            <?php echo $form->textField($model, 'emailcount'); ?>
            <?php echo $form->error($model, 'emailcount'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model, 'suspeciousemail'); ?>
            <?php echo $form->textField($model, 'suspeciousemail'); ?>
            <?php echo $form->error($model, 'suspeciousemail'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model, 'senddate'); ?>
            <?php //echo $form->textField($model, 'senddate'); ?>
            <?php
            $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                'options' => array(
                    'dateFormat' => "yy-mm-dd",
                ),
                'model' => $model,
                'attribute' => 'senddate',
                'htmlOptions' => array(
                    'size' => '10', // textField size
                    'maxlength' => '10', // textField maxlength
                ),
            ));
            ?>
            <?php echo $form->error($model, 'senddate'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model, 'suspeciousbody'); ?>
            <?php echo $form->textArea($model, 'suspeciousbody'); ?>
            <?php echo $form->error($model, 'suspeciousbody'); ?>
        </div>

        <?php if (CCaptcha::checkRequirements()): ?>
            <div class="row captcha">
                <?php echo $form->labelEx($model, 'verifyCode'); ?>
                <div>
                    <?php $this->widget('CCaptcha'); ?>
                    <?php echo $form->textField($model, 'verifyCode'); ?>
                </div>
                <div class="hint">Please enter the letters as they are shown in the image above.
                    <br/>Letters are not case-sensitive.</div>
                <?php echo $form->error($model, 'verifyCode'); ?>
            </div>
        <?php endif; ?>
        <p class="note"><span class="required">*</span> (Asterisk) denotes required fields which therefore must not be left empty.</p>
        <div class="row buttons">
            <?php echo CHtml::submitButton('Submit'); ?>
        </div>
        <?php $this->endWidget(); ?>
    </div>
<?php endif; ?>